Learn how to delete replica indices in the dashboard and with the API.
In the Algolia dashboard, you can delete replica indices like regular indices.
For more information, see Delete indices in the Algolia dashboard.Using the API, you can delete a replica index in two steps:
Unlink the replica index from its primary.
This turns the replica into a regular index.
To unlink a replica index from its primary index,
remove it from the replicas setting of the primary index,
using the setSettings method:
Copy
Ask AI
IndexSettings settings = new IndexSettings { Replicas = new List<string> { } };// Set Settings--Synchronousprimary_index.SetSettings(settings);// Set Settings--Asynchronousawait primary_index.SetSettingsAsync(settings);
If want to keep other replicas,
don’t remove them from the replicas setting.
If you set replicas to an empty string or list,
all replicas will be unlinked.